﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace Module.FlowChart.RunAble.View
{
    public partial class Form_NodePropertyEditor : Form
    {
        public Form_NodePropertyEditor()
        {
            InitializeComponent();
            TopLevel = false;
            Tab_IO_InBtn.BackColor = Color.Blue;
            Tab_IO_InBtn.Click += (s, e) =>
            {
                IsInput = true;
            };
            Tab_IO_OutBtn.Click += (s, e) => { IsInput = false; };

        }


        bool m_IsInput = true;
        public bool IsInput
        {
            get => m_IsInput;
            set
            {
                if (m_IsInput != value)
                {
                    m_IsInput = value;
                    Color c = Tab_IO_InBtn.BackColor;
                    Tab_IO_InBtn.BackColor = Tab_IO_OutBtn.BackColor;
                    Tab_IO_OutBtn.BackColor = c;
                    IsInputChanged?.Invoke();
                }
            }
        }
        public Action IsInputChanged;

        private void Tab_Common_Label8_Click(object sender, EventArgs e)
        {

        }

        private void Form_NodePropertyEditor_Load(object sender, EventArgs e)
        {

        }
    }
}
